﻿/*
 *
 * User: inffbr
 * Date: 17.02.2011
 * Time: 09:22
 * 
 */
using System;
using System.Collections.Generic;
using ThatsMeSDK;
using ThatsMeSDK.Core;

namespace SDKTest
{
	class Program
	{
		public static void Main(string[] args)
		{
			Console.WriteLine("Test Project");
			
			//Other Kenrel tests
			//KernelTestFuncs.JsonDataLoaderTest();
			
			//Initialize Kernel
			ThatsMeSDK.Core.ServiceHandler.Initialize(DataFormat.Xml, false, "mobile=1");
			
			Console.WriteLine("broox: " + ServiceHandler.CheckMemberByNick("broox"));
			Console.WriteLine("ZuckerM4us: " + ServiceHandler.CheckMemberByNick("ZuckerM4us"));
			Console.WriteLine("Broox: " + ServiceHandler.CheckMemberByNick("Broox"));
			
//			Member m = ThatsMeSDK.Core.ServiceHandler.GetMemberByNick("tmdotnetapi");	
//			GalleryPicture p = m.Categories[0].CategoryPictures[0];
			
			//
			string token = ThatsMeSDK.Core.ServiceHandler.Authenticate("tmdotnetapi", ThatsMeSDK.Core.ServiceHandler.CalculateMD5("nexpose"));
			
			GalleryPicture ruedigerimage = ThatsMeSDK.Core.ServiceHandler.GetRandomPic(token);
			List<Member> members = ThatsMeSDK.Core.ServiceHandler.GetFriends("broox");
			
			foreach(Member m in members)
			{
				Console.WriteLine(ServiceHandler.GetMemberByNick(m.Nick).Description);
			}
			
//			bool b = ThatsMeSDK.Core.ServiceHandler.AddPicRating(token, 466080, VoteType.Positive);
			/*
			//Kernel Test
			KernelTestFuncs.SendMessageTest();
			KernelTestFuncs.GetGalleryCategoriesTest();
			KernelTestFuncs.GetGalleryPicturesTest();
			
			KernelTestFuncs.LoadPicturesTest();
			KernelTestFuncs.LoadMessagesTest();
			KernelTestFuncs.CountMessagesTest();
			KernelTestFuncs.LoadMemberByIdTest();
            KernelTestFuncs.TestDashBoard();
			
			Console.Write("Press any key to continue . . . ");
			Console.ReadKey(true);
			*/
			//KernelTestFuncsND testFuncsND = new KernelTestFuncsND();
			
			Console.Write("Tests finished. Press any key to exit");
			Console.ReadKey(true);
		}
	}
}